package com.huanong.controller;
/*
 *@Author:anran
 *@Date:2020/12/9
 *@Version 1.0
 */

import com.huanong.common.grace.result.GraceJSONResult;
import com.huanong.pojo.ConTact;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

@Api(value = "联系我们",tags = {"联系我们"})
@RequestMapping("/contact")
@CrossOrigin(origins = "*")
public interface ContactControllerApi {

    @ApiOperation(value = "查询联系记录接口",notes = "查询联系记录",httpMethod = "GET")
    @GetMapping("/queryContact")
    GraceJSONResult queryContact();

    @ApiOperation(value = "根据id查询联系记录接口",notes = "根据id查询联系记录",httpMethod = "GET")
    @GetMapping("/queryContactById")
    GraceJSONResult queryContactById(@RequestParam("CtId") Integer CtId);

    @ApiOperation(value = "添加联系记录接口",notes ="添加联系记录",httpMethod = "POST")
    @PostMapping("/addContact")
    GraceJSONResult addContact(@RequestBody ConTact conTact);

    @ApiOperation(value = "删除联系记录接口",notes = "删除联系记录",httpMethod = "GET")
    @GetMapping("/deleteContact")
    GraceJSONResult deleteContact(@RequestParam("CtId") Integer CtId);

    @ApiOperation(value = "更新联系记录接口",notes = "更新联系记录",httpMethod = "POST")
    @PostMapping("/updateContact")
    GraceJSONResult updateContact(@RequestBody ConTact conTact);
}
